Skip to content

Conversation

@lolrobbe2
Copy link
Contributor

What does this PR do?
this pr aims to rectify #2551

format:

params non determenistic:

for params wich are not deterministic IE have standard values like architecture the following style is used:

`<param_name>` **param_type** - <description>.

params deterministic:

for params wich are deterministic a MD table is used:

for architecture:
arch is the enum/param name

| Arch           | Description                                      |
|-------------|--------------------------------------------------|
| universal    | Universal binaries supported by iOS and macOS    |
| x86            | 32-bit x86 architecture                          |
| x86_64       | 64-bit x86 architecture                          |
| ARM          | 32-bit ARM architecture                          |
| ARM64       | 64-bit ARM architecture                          |
| RISCV64     | 64-bit RISC-V architecture                       |

@lolrobbe2 lolrobbe2 changed the title fix: updated docs styling for allmodulespublic -> customtoolnamespace… fix: updated docs styling Dec 2, 2025

```lua
architecture ("value")
architecture ("arch")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both "value"/"arch" are wrong there (not valid value). value/arch would be good (variable might have a correct value)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the idea is to be able to extract the name and get the following:

function architecture(arch) end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the quotes that bore me (which shouldn't avoid the name extraction).

Some APIs accept mostly any strings, some quote are OKish, some expect specific string, and providing unexpected ones is confusing IMO.
architecture ("value") was already wrong, and should have been architecture (value) (or architecture ("%{value}")).
And then you should only have renamed 'value' to 'arch'.

---
title: basedir
description: Sets the base directory for a configuration
keywords: [premake, basedir, base directory, path, configuration]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems you use config in other places

---
title: buildcustomizations
description: Imports custom .props files for Visual Studio.
keywords: [premake, buildcustomizations, visual studio, props, project]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'project' versus 'project config'?

@lolrobbe2
Copy link
Contributor Author

lolrobbe2 commented Dec 2, 2025

@Jarod42 maby i should also add a file wich describes the docs styling.

and could you help me figure out a way to enforce this maby via CI?

@lolrobbe2
Copy link
Contributor Author

@Jarod42 i started work on a js script that cheks the documentation format and logs potential errors and fails when errors are found.

i am also creating a helper script to streamline generating documentation files

@Jarod42
Copy link
Contributor

Jarod42 commented Dec 3, 2025

if you have a script to check documentation, it should probably be called from https://github.com/premake/premake-core/blob/master/.github/workflows/website.yml to ensure consistency.
It just has to return non-zero in case of failure from CI point of view, but messages help humans :-)

@lolrobbe2
Copy link
Contributor Author

if you have a script to check documentation, it should probably be called from https://github.com/premake/premake-core/blob/master/.github/workflows/website.yml to ensure consistency. It just has to return non-zero in case of failure from CI point of view, but messages help humans :-)

yes that is the goal, it is just a js script so can be run in the website task.

and logs precise errors when things are wrong

@@ -1,17 +1,25 @@
---
title: callingconvention
description: Sets whether or not the compiler should build STL modules.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm against adding title and description front-matters when they are not necessary. If not set, the title of the page is its filename and it's fine for 99% of our pages. Same goes for description. Docusaurus takes first paragraph as a description so there is no need to repeat it in the front-matter. It's bug-prone and this PR proves it. This description is copied from another page :)

---
title: callingconvention
description: Sets whether or not the compiler should build STL modules.
keywords: [premake, callingconvention, cdecl, fastcall, stdcall, vectorcall, function calling convention, compiler, project config]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is your algorithm for generating keywords for every page? Do they help you in any way? Because I am pretty much sure they will not affect searchability of our docs at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants